package homeword;

public class objectArray4girlFriend {
    private String name;
    private int age;
    private String gander;
    private String hobby;//爱好

    public objectArray4girlFriend() {
    }
    public objectArray4girlFriend(String name, int age, String gander, String hobby) {
        this.name = name;
        this.age = age;
        this.gander = gander;
        this.hobby = hobby;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGander() {
        return gander;
    }

    public void setGander(String gander) {
        this.gander = gander;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }
    //打印女朋友的所有信息
    public void showArr(objectArray4girlFriend []arr){
        for (int i = 0; i < arr.length; i++) {
            objectArray4girlFriend gf=new objectArray4girlFriend();
            System.out.println("姓名："+gf.getName());
            System.out.println("年龄："+gf.getAge());
            System.out.println("性别："+gf.getGander());
            System.out.println("爱好："+gf.getHobby());
        }
    }
}
